package darknet.application.filesharing.spec;

import java.io.File;
import java.io.Serializable;

/**
 * A release is one or more files or directory with some informations such as
 * filenames, hashes and sizes.
 * 
 * @author yoyo
 */
public interface Release extends Serializable {

    /**
     * @return The releases in this release. It happend when a release contain
     * more than one single file.
     */
    Release[] get();

    /**
     * @return the hash of the release
     *         (return null if the release is a directory)
     */
    Hash getHash();

    /**
     * @return the chunks of the release
     *          (return null if the release is a directory)
     */
    Chunk[] getChunks();

    /**
     * @return The filename of the release (file or directory).
     */
    File getFile();
}
